package com.usian.behavior.controller;

import com.usian.apis.behavior.UnLikesBehaviorControllerApi;
import com.usian.behavior.service.UnLikesBehaviorService;
import com.usian.model.behavior.dtos.UnLikesBehaviorDto;
import com.usian.model.behavior.pojos.ApUnlikesBehavior;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/v1/unlike_behavior")
public class UnLikesBehaviorController implements UnLikesBehaviorControllerApi {
    @Autowired
    private UnLikesBehaviorService service;

    @Override
    @PostMapping
    public ResponseResult like(@RequestBody UnLikesBehaviorDto dto) {
        return service.like(dto);
    }

    @Override
    @GetMapping("getUnLikesBehavior")
    public ApUnlikesBehavior getUnLikesBehavior(@RequestParam Long articleId,@RequestParam Integer entryId) {
        return service.getUnLikesBehavior(articleId,entryId);
    }
}
